
package jweslley.ProblemSetVolumes.VolumeIV;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import jweslley.Problem;
import jweslley.Problem.Status;

/**
 * http://icpcres.ecs.baylor.edu/onlinejudge/external/4/483.html
 *
 * @author  Jonhnny Weslley
 * @version 1.00, 19/10/2008
 */
@Problem(Status.Accepted)
public class WordScramble {

	public static void main(String[] args) throws IOException {
		StringBuilder out = new StringBuilder();
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String line;
		StringBuilder word = new StringBuilder();
		while ((line = in.readLine()) != null) {
			String[] split = line.split(" ");
			for (int i = 0; i < split.length; i++) {
				String text = split[i];
				out.append(word.append(text).reverse());
				if (i < split.length - 1) {
					out.append(' ');
				}
				word.setLength(0);
			}
			out
			.append('\n');
		}
		System.out.print(out);
	}

}
